<?php

namespace app\admin\model;

use think\Model;
use think\Db;
class Talents extends Model
{
    // 表名
    protected $name = 'pay_see';
    public function lists($list,$type){
        foreach($list as $key=>$l){

            $list[$key]['z_price']=DB::name('pay_see')
                                    ->alias('uw')
                                    ->join('amoy a','uw.amoy_id = a.amoy_id')
                                    ->where('a.type_id=1 and uw.user_id='.$list[$key]['user_id'])
                                    ->sum('price');
            $list[$key]['startime']=date('Y-m-d H:i:s',$list[$key]['see_start_time']);
            $list[$key]['endtime']=date('Y-m-d H:i:s',$list[$key]['see_end_time']);


        }
        return $list;
    }
}